/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package it.polimi.games.epkb.entityClasses;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author plebani
 */
@Embeddable
public class ProcessStructurePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "IDActivityPREC")
    private String iDActivityPREC;
    @Basic(optional = false)
    @Column(name = "IDActivityFOLLOW")
    private String iDActivityFOLLOW;
    @Basic(optional = false)
    @Column(name = "Id_Process")
    private String idProcess;
    @Basic(optional = false)
    @Column(name = "Id_ThisActivity")
    private String idThisActivity;

    public ProcessStructurePK() {
    }

    public ProcessStructurePK(String iDActivityPREC, String iDActivityFOLLOW, String idProcess, String idThisActivity) {
        this.iDActivityPREC = iDActivityPREC;
        this.iDActivityFOLLOW = iDActivityFOLLOW;
        this.idProcess = idProcess;
        this.idThisActivity = idThisActivity;
    }

    public String getIDActivityPREC() {
        return iDActivityPREC;
    }

    public void setIDActivityPREC(String iDActivityPREC) {
        this.iDActivityPREC = iDActivityPREC;
    }

    public String getIDActivityFOLLOW() {
        return iDActivityFOLLOW;
    }

    public void setIDActivityFOLLOW(String iDActivityFOLLOW) {
        this.iDActivityFOLLOW = iDActivityFOLLOW;
    }

    public String getIdProcess() {
        return idProcess;
    }

    public void setIdProcess(String idProcess) {
        this.idProcess = idProcess;
    }

    public String getIdThisActivity() {
        return idThisActivity;
    }

    public void setIdThisActivity(String idThisActivity) {
        this.idThisActivity = idThisActivity;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (iDActivityPREC != null ? iDActivityPREC.hashCode() : 0);
        hash += (iDActivityFOLLOW != null ? iDActivityFOLLOW.hashCode() : 0);
        hash += (idProcess != null ? idProcess.hashCode() : 0);
        hash += (idThisActivity != null ? idThisActivity.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ProcessStructurePK)) {
            return false;
        }
        ProcessStructurePK other = (ProcessStructurePK) object;
        if ((this.iDActivityPREC == null && other.iDActivityPREC != null) || (this.iDActivityPREC != null && !this.iDActivityPREC.equals(other.iDActivityPREC))) {
            return false;
        }
        if ((this.iDActivityFOLLOW == null && other.iDActivityFOLLOW != null) || (this.iDActivityFOLLOW != null && !this.iDActivityFOLLOW.equals(other.iDActivityFOLLOW))) {
            return false;
        }
        if ((this.idProcess == null && other.idProcess != null) || (this.idProcess != null && !this.idProcess.equals(other.idProcess))) {
            return false;
        }
        if ((this.idThisActivity == null && other.idThisActivity != null) || (this.idThisActivity != null && !this.idThisActivity.equals(other.idThisActivity))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "it.polimi.games.epkb.entityClasses.ProcessStructurePK[ iDActivityPREC=" + iDActivityPREC + ", iDActivityFOLLOW=" + iDActivityFOLLOW + ", idProcess=" + idProcess + ", idThisActivity=" + idThisActivity + " ]";
    }
    
}
